Optimal. Leaf size=75 \[ \frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-\frac {\sqrt {2} \sqrt {a} (B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {3527, 3480, 206} \[ \frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-\frac {\sqrt {2} \sqrt {a} (B+i A) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3480
Rule 3527
Rubi steps
\begin {align*} \int \sqrt {a+i a \tan (c+d x)} (A+B \tan (c+d x)) \, dx &=\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-(-A+i B) \int \sqrt {a+i a \tan (c+d x)} \, dx\\ &=\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}-\frac {(2 a (i A+B)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\sqrt {a+i a \tan (c+d x)}\right )}{d}\\ &=-\frac {\sqrt {2} \sqrt {a} (i A+B) \tanh ^{-1}\left (\frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{d}+\frac {2 B \sqrt {a+i a \tan (c+d x)}}{d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.26, size = 87, normalized size = 1.16 \[ \frac {e^{-i (c+d x)} \sqrt {a+i a \tan (c+d x)} \left (2 B e^{i (c+d x)}-i (A-i B) \sqrt {1+e^{2 i (c+d x)}} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.07, size = 278, normalized size = 3.71 \[ \frac {8 \, \sqrt {2} B \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )} - d \sqrt {-\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} + \sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) + d \sqrt {-\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \log \left (\frac {{\left ({\left (4 i \, A + 4 \, B\right )} a e^{\left (i \, d x + i \, c\right )} - \sqrt {2} {\left (d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \sqrt {-\frac {{\left (8 \, A^{2} - 16 i \, A B - 8 \, B^{2}\right )} a}{d^{2}}} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right )}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.23, size = 63, normalized size = 0.84 \[ \frac {2 i \left (-i B \sqrt {a +i a \tan \left (d x +c \right )}-\frac {\sqrt {a}\, \left (-i B +A \right ) \sqrt {2}\, \arctanh \left (\frac {\sqrt {a +i a \tan \left (d x +c \right )}\, \sqrt {2}}{2 \sqrt {a}}\right )}{2}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.78, size = 87, normalized size = 1.16 \[ \frac {i \, {\left (\sqrt {2} {\left (A - i \, B\right )} a^{\frac {3}{2}} \log \left (-\frac {\sqrt {2} \sqrt {a} - \sqrt {i \, a \tan \left (d x + c\right ) + a}}{\sqrt {2} \sqrt {a} + \sqrt {i \, a \tan \left (d x + c\right ) + a}}\right ) - 4 i \, \sqrt {i \, a \tan \left (d x + c\right ) + a} B a\right )}}{2 \, a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.53, size = 96, normalized size = 1.28 \[ \frac {2\,B\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{d}-\frac {\sqrt {2}\,A\,\sqrt {-a}\,\mathrm {atan}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {-a}}\right )\,1{}\mathrm {i}}{d}-\frac {\sqrt {2}\,B\,\sqrt {a}\,\mathrm {atanh}\left (\frac {\sqrt {2}\,\sqrt {a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}}}{2\,\sqrt {a}}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {i a \left (\tan {\left (c + d x \right )} - i\right )} \left (A + B \tan {\left (c + d x \right )}\right )\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________